 $(document).ready(function() {
    $('#captcha').on('click', function() {
        refreshCaptcha();
    });
    
});
function refreshCaptcha() {
    $('#captcha').attr('src', '/api/captcha?' + Math.random());
}